package com.lelouch.mapper;

import com.lelouch.bean.Employee;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface EmployeeMapper {

    public Map<String,Object> selectEmployeeMapById(Integer id);

    @MapKey("id")
    public Map<String,Employee> selectEmployeesMapByLastName(String lastName);

    public List<Employee> selectEmployeesByLastName(String lastName);

    public Employee selectEmployee(Integer id);

    public Employee selectEmployeeByIdAndLastName(@Param("id") Integer id, @Param("lastName")String lastName);

    public Boolean addEmployee(Employee employee);

    public Integer updateEmployee(Employee employee);

    public Boolean deleteEmployee(Integer id);
}